package com.travel.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import lombok.Data;

/**
 * 
 * @TableName order
 */
@TableName(value ="order")
@Data
public class Order implements Serializable {
    /**
     * 订单id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 订单类型(1、酒店  2、机票  3、火车票  4、租车)
     */
    @TableField(value = "order_type")
    private Integer orderType;

    /**
     * 城市id
     */
    @TableField(value = "city_id")
    private Integer cityId;

    /**
     * 身份证号
     */
    @TableField(value = "id_number")
    private String idNumber;

    /**
     * 姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 出行人手机号
     */
    @TableField(value = "phoneNumber")
    private Integer phonenumber;

    /**
     * 酒店名
     */
    @TableField(value = "hotel_name")
    private String hotelName;

    /**
     * 酒店位置
     */
    @TableField(value = "hotel_address")
    private Integer hotelAddress;

    /**
     * 房间id
     */
    @TableField(value = "hotel_room_type")
    private Integer hotelRoomType;

    /**
     * 入住时间
     */
    @TableField(value = "check_in_time")
    private LocalDate checkInTime;

    /**
     * 退房时间
     */
    @TableField(value = "check_out_time")
    private Integer checkOutTime;

    /**
     * 房间数量
     */
    @TableField(value = "room_count")
    private Integer roomCount;

    /**
     * 住客名
     */
    @TableField(value = "guest_name")
    private Integer guestName;

    /**
     * 邮件
     */
    @TableField(value = "email")
    private String email;

    /**
     * 预计到店时间
     */
    @TableField(value = "expect_time")
    private LocalDate expectTime;

    /**
     * 特别要求
     */
    @TableField(value = "special_requirement")
    private Integer specialRequirement;

    /**
     * 租车套餐id
     */
    @TableField(value = "car_package_id")
    private Integer carPackageId;

    /**
     * 租车起始时间
     */
    @TableField(value = "car_start_time")
    private LocalDate carStartTime;

    /**
     * 租车结束时间
     */
    @TableField(value = "car_stop_time")
    private LocalDate carStopTime;

    /**
     * 驾驶人
     */
    @TableField(value = "driver_name")
    private String driverName;

    /**
     * 订单状态(1、未付款  2、已付款  3、已取消  4、已完成)
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 总价
     */
    @TableField(value = "total_price")
    private Integer totalPrice;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Order other = (Order) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
            && (this.getCityId() == null ? other.getCityId() == null : this.getCityId().equals(other.getCityId()))
            && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getPhonenumber() == null ? other.getPhonenumber() == null : this.getPhonenumber().equals(other.getPhonenumber()))
            && (this.getHotelName() == null ? other.getHotelName() == null : this.getHotelName().equals(other.getHotelName()))
            && (this.getHotelAddress() == null ? other.getHotelAddress() == null : this.getHotelAddress().equals(other.getHotelAddress()))
            && (this.getHotelRoomType() == null ? other.getHotelRoomType() == null : this.getHotelRoomType().equals(other.getHotelRoomType()))
            && (this.getCheckInTime() == null ? other.getCheckInTime() == null : this.getCheckInTime().equals(other.getCheckInTime()))
            && (this.getCheckOutTime() == null ? other.getCheckOutTime() == null : this.getCheckOutTime().equals(other.getCheckOutTime()))
            && (this.getRoomCount() == null ? other.getRoomCount() == null : this.getRoomCount().equals(other.getRoomCount()))
            && (this.getGuestName() == null ? other.getGuestName() == null : this.getGuestName().equals(other.getGuestName()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getExpectTime() == null ? other.getExpectTime() == null : this.getExpectTime().equals(other.getExpectTime()))
            && (this.getSpecialRequirement() == null ? other.getSpecialRequirement() == null : this.getSpecialRequirement().equals(other.getSpecialRequirement()))
            && (this.getCarPackageId() == null ? other.getCarPackageId() == null : this.getCarPackageId().equals(other.getCarPackageId()))
            && (this.getCarStartTime() == null ? other.getCarStartTime() == null : this.getCarStartTime().equals(other.getCarStartTime()))
            && (this.getCarStopTime() == null ? other.getCarStopTime() == null : this.getCarStopTime().equals(other.getCarStopTime()))
            && (this.getDriverName() == null ? other.getDriverName() == null : this.getDriverName().equals(other.getDriverName()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getTotalPrice() == null ? other.getTotalPrice() == null : this.getTotalPrice().equals(other.getTotalPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
        result = prime * result + ((getCityId() == null) ? 0 : getCityId().hashCode());
        result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getPhonenumber() == null) ? 0 : getPhonenumber().hashCode());
        result = prime * result + ((getHotelName() == null) ? 0 : getHotelName().hashCode());
        result = prime * result + ((getHotelAddress() == null) ? 0 : getHotelAddress().hashCode());
        result = prime * result + ((getHotelRoomType() == null) ? 0 : getHotelRoomType().hashCode());
        result = prime * result + ((getCheckInTime() == null) ? 0 : getCheckInTime().hashCode());
        result = prime * result + ((getCheckOutTime() == null) ? 0 : getCheckOutTime().hashCode());
        result = prime * result + ((getRoomCount() == null) ? 0 : getRoomCount().hashCode());
        result = prime * result + ((getGuestName() == null) ? 0 : getGuestName().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getExpectTime() == null) ? 0 : getExpectTime().hashCode());
        result = prime * result + ((getSpecialRequirement() == null) ? 0 : getSpecialRequirement().hashCode());
        result = prime * result + ((getCarPackageId() == null) ? 0 : getCarPackageId().hashCode());
        result = prime * result + ((getCarStartTime() == null) ? 0 : getCarStartTime().hashCode());
        result = prime * result + ((getCarStopTime() == null) ? 0 : getCarStopTime().hashCode());
        result = prime * result + ((getDriverName() == null) ? 0 : getDriverName().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getTotalPrice() == null) ? 0 : getTotalPrice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderType=").append(orderType);
        sb.append(", cityId=").append(cityId);
        sb.append(", idNumber=").append(idNumber);
        sb.append(", name=").append(name);
        sb.append(", phonenumber=").append(phonenumber);
        sb.append(", hotelName=").append(hotelName);
        sb.append(", hotelAddress=").append(hotelAddress);
        sb.append(", hotelRoomType=").append(hotelRoomType);
        sb.append(", checkInTime=").append(checkInTime);
        sb.append(", checkOutTime=").append(checkOutTime);
        sb.append(", roomCount=").append(roomCount);
        sb.append(", guestName=").append(guestName);
        sb.append(", email=").append(email);
        sb.append(", expectTime=").append(expectTime);
        sb.append(", specialRequirement=").append(specialRequirement);
        sb.append(", carPackageId=").append(carPackageId);
        sb.append(", carStartTime=").append(carStartTime);
        sb.append(", carStopTime=").append(carStopTime);
        sb.append(", driverName=").append(driverName);
        sb.append(", status=").append(status);
        sb.append(", totalPrice=").append(totalPrice);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}